package com.hzf.order.dao.model;

import com.hzf.material.dao.model.MaterialShop;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class OrderUser implements Serializable {
    private Integer id;

    /**
     * 收货地址
     *
     * @mbg.generated
     */
    private String address;

    /**
     * 订单创建时间
     *
     * @mbg.generated
     */
    private Date createTime;

    /**
     * 订单支付时间
     *
     * @mbg.generated
     */
    private Date payTime;

    /**
     * 订单支付金额
     *
     * @mbg.generated
     */
    private Double payPrice;

    /**
     * 配送支付金额
     *
     * @mbg.generated
     */
    private Long distributionFee;

    /**
     * 订单支付状态 0:未支付 1已支付
     *
     * @mbg.generated
     */
    private Integer payState;

    /**
     * 订单联系电话
     *
     * @mbg.generated
     */
    private Long phone;

    /**
     * 订单联系人
     *
     * @mbg.generated
     */
    private String userName;

    /**
     * 关联用户
     *
     * @mbg.generated
     */
    private Integer userId;

    private String orderPayId;

    private int orderState;

    private int goodsCount; //本店铺购买商品数量

    private double goodsPrice;//本店铺购买商品价格

    private int goodsTypecount;//本店铺购买商品总数量

    private String createdataTime;
    private List<OrderUserInfo> orderUserInfoList;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Double getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(Double payPrice) {
        this.payPrice = payPrice;
    }

    public Long getDistributionFee() {
        return distributionFee;
    }

    public void setDistributionFee(Long distributionFee) {
        this.distributionFee = distributionFee;
    }

    public Integer getPayState() {
        return payState;
    }

    public void setPayState(Integer payState) {
        this.payState = payState;
    }

    public Long getPhone() {
        return phone;
    }

    public void setPhone(Long phone) {
        this.phone = phone;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public List<OrderUserInfo> getOrderUserInfoList() {
        return orderUserInfoList;
    }

    public void setOrderUserInfoList(List<OrderUserInfo> orderUserInfoList) {
        this.orderUserInfoList = orderUserInfoList;
    }

    public String getOrderPayId() {
        return orderPayId;
    }

    public void setOrderPayId(String orderPayId) {
        this.orderPayId = orderPayId;
    }

    public int getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(int goodsCount) {
        this.goodsCount = goodsCount;
    }

    public double getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(double goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public int getGoodsTypecount() {
        return goodsTypecount;
    }

    public void setGoodsTypecount(int goodsTypecount) {
        this.goodsTypecount = goodsTypecount;
    }

    public String getCreatedataTime() {
        return createdataTime;
    }

    public void setCreatedataTime(String createdataTime) {
        this.createdataTime = createdataTime;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", address=").append(address);
        sb.append(", createTime=").append(createTime);
        sb.append(", payTime=").append(payTime);
        sb.append(", payPrice=").append(payPrice);
        sb.append(", distributionFee=").append(distributionFee);
        sb.append(", payState=").append(payState);
        sb.append(", phone=").append(phone);
        sb.append(", userName=").append(userName);
        sb.append(", userId=").append(userId);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderUser other = (OrderUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
            && (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice()))
            && (this.getDistributionFee() == null ? other.getDistributionFee() == null : this.getDistributionFee().equals(other.getDistributionFee()))
            && (this.getPayState() == null ? other.getPayState() == null : this.getPayState().equals(other.getPayState()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode());
        result = prime * result + ((getDistributionFee() == null) ? 0 : getDistributionFee().hashCode());
        result = prime * result + ((getPayState() == null) ? 0 : getPayState().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }
}